package com.xmqian.app.project.ui.user.contract

import com.coszero.common.base.mvp.BaseView
import com.xmqian.app.project.ui.user.model.LoginModel

interface LoginContract {
    interface Model

    interface View : BaseView {
        fun onLoginSucceed(data: LoginModel)

        fun onRequestFailed(message: String?)

        val codeSuccess: Unit
    }

    interface Presenter {
        /**
         * 登录
         *
         * @param username 用户名
         * @param pwd 密码
         */
        fun doLogin(username: String, pwd: String)

        /**
         * 快捷登录
         *
         * @param username
         * @param smsCode
         */
        fun quickLogin(username: String, smsCode: String)

        /**
         * 获取验证码
         *
         * @param type
         * @param phone
         */
        fun getSmsCode2(type: Int, phone: String)
    }
}
